const { defineConfig } = require('@vue/cli-service')
//https://blog.csdn.net/MinggeQingchun/article/details/130796019
module.exports = defineConfig({
  devServer: {
    host: '0.0.0.0',
    port: 80,
    open: true,
    proxy: {
      // detail: https://cli.vuejs.org/config/#devserver-proxy
      ['/dev-api']: {
        target: `http://localhost:8100`,
        changeOrigin: true,
        pathRewrite: {
          ['^' + '/dev-api']: ''
        }
      },
      ['/prod-api']: {
        target: `http://localhost:8100`,
        changeOrigin: true,
        pathRewrite: {
          ['^' + '/prod-api']: ''
        }
      }
    }
  }
})
